package co.yixiang.modules.order.vo;

import co.yixiang.modules.activity.vo.StoreCouponUserVo;
import co.yixiang.modules.cart.vo.YxStoreCartQueryVo;
import co.yixiang.modules.order.service.dto.PriceGroupDto;
import co.yixiang.modules.product.vo.YxSystemStoreQueryVo;
import co.yixiang.modules.user.domain.YxUserAddress;
import co.yixiang.modules.user.vo.YxUserQueryVo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * @ClassName ConfirmOrderVo
 * @Author hupeng <610796224@qq.com>
 * @Date 2019/10/27
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ConfirmOrderVo implements Serializable {
    //地址信息
    private YxUserAddress addressInfo;

    //砍价id
    private Integer bargainId;

    private List<YxStoreCartQueryVo> cartInfo;

    private Integer combinationId;

    //优惠券减
    private Boolean deduction;

    private Boolean enableIntegral;

    private Double enableIntegralNum;

    //积分抵扣
    private Integer integralRatio;

    private String orderKey;

    private PriceGroupDto priceGroup;

    private Integer seckillId;

    //店铺自提
    private Integer storeSelfMention;

    //店铺信息
    private YxSystemStoreQueryVo systemStore;


    private StoreCouponUserVo usableCoupon;

    private YxUserQueryVo userInfo;

    public static ConfirmOrderVoBuilder builder() {
        return new ConfirmOrderVoBuilder();
    }


    public static class ConfirmOrderVoBuilder {
        private YxUserAddress addressInfo;
        private Integer bargainId;
        private List<YxStoreCartQueryVo> cartInfo;
        private Integer combinationId;
        private Boolean deduction;
        private Boolean enableIntegral;
        private Double enableIntegralNum;
        private Integer integralRatio;
        private String orderKey;
        private PriceGroupDto priceGroup;
        private Integer seckillId;
        private Integer storeSelfMention;
        private YxSystemStoreQueryVo systemStore;
        private StoreCouponUserVo usableCoupon;
        private YxUserQueryVo userInfo;

        ConfirmOrderVoBuilder() {
        }

        public ConfirmOrderVoBuilder addressInfo(YxUserAddress addressInfo) {
            this.addressInfo = addressInfo;
            return this;
        }

        public ConfirmOrderVoBuilder bargainId(Integer bargainId) {
            this.bargainId = bargainId;
            return this;
        }

        public ConfirmOrderVoBuilder cartInfo(List<YxStoreCartQueryVo> cartInfo) {
            this.cartInfo = cartInfo;
            return this;
        }

        public ConfirmOrderVoBuilder combinationId(Integer combinationId) {
            this.combinationId = combinationId;
            return this;
        }

        public ConfirmOrderVoBuilder deduction(Boolean deduction) {
            this.deduction = deduction;
            return this;
        }

        public ConfirmOrderVoBuilder enableIntegral(Boolean enableIntegral) {
            this.enableIntegral = enableIntegral;
            return this;
        }

        public ConfirmOrderVoBuilder enableIntegralNum(Double enableIntegralNum) {
            this.enableIntegralNum = enableIntegralNum;
            return this;
        }

        public ConfirmOrderVoBuilder integralRatio(Integer integralRatio) {
            this.integralRatio = integralRatio;
            return this;
        }

        public ConfirmOrderVoBuilder orderKey(String orderKey) {
            this.orderKey = orderKey;
            return this;
        }

        public ConfirmOrderVoBuilder priceGroup(PriceGroupDto priceGroup) {
            this.priceGroup = priceGroup;
            return this;
        }

        public ConfirmOrderVoBuilder seckillId(Integer seckillId) {
            this.seckillId = seckillId;
            return this;
        }

        public ConfirmOrderVoBuilder storeSelfMention(Integer storeSelfMention) {
            this.storeSelfMention = storeSelfMention;
            return this;
        }

        public ConfirmOrderVoBuilder systemStore(YxSystemStoreQueryVo systemStore) {
            this.systemStore = systemStore;
            return this;
        }

        public ConfirmOrderVoBuilder usableCoupon(StoreCouponUserVo usableCoupon) {
            this.usableCoupon = usableCoupon;
            return this;
        }

        public ConfirmOrderVoBuilder userInfo(YxUserQueryVo userInfo) {
            this.userInfo = userInfo;
            return this;
        }

        public ConfirmOrderVo build() {
            return new ConfirmOrderVo(addressInfo, bargainId, cartInfo, combinationId, deduction, enableIntegral, enableIntegralNum, integralRatio, orderKey, priceGroup, seckillId, storeSelfMention, systemStore, usableCoupon, userInfo);
        }

        public String toString() {
            return "ConfirmOrderVo.ConfirmOrderVoBuilder(addressInfo=" + this.addressInfo + ", bargainId=" + this.bargainId + ", cartInfo=" + this.cartInfo + ", combinationId=" + this.combinationId + ", deduction=" + this.deduction + ", enableIntegral=" + this.enableIntegral + ", enableIntegralNum=" + this.enableIntegralNum + ", integralRatio=" + this.integralRatio + ", orderKey=" + this.orderKey + ", priceGroup=" + this.priceGroup + ", seckillId=" + this.seckillId + ", storeSelfMention=" + this.storeSelfMention + ", systemStore=" + this.systemStore + ", usableCoupon=" + this.usableCoupon + ", userInfo=" + this.userInfo + ")";
        }
    }
}
